import axios from './http';

export default {
  getPhamacy(params) {
    const url = '/drug/take';
    return new Promise((resolve, reject) => {
      axios.post(url, params).then(resp => {
        resolve(resp)
      });
    });
  },
  get(params,query) {
    const url = '/drug/take?time=' + params + '&query=' + query + '&pageIndex=1&pageSize=10'
    return new Promise((resolve, reject) => {
        axios.get(url).then(data => {
            // return data
            resolve(data)
            // console.log(data)
        });
    })
    // return new Promise((resolve, reject) => {
    //     axios.post(url, params).then(resp => {
    //       resolve(resp)
    //     });
    //   });
  }

};
